Only set scheduler quantum timer for non-idle VCPUs
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 1 Apr 2009 14:39:20 +0000 (15:39 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 1 Apr 2009 14:39:20 +0000 (15:39 +0100)
This removes the last idle periodic timer in xen, and enhances the
idle average C state residency from two-digits ms  to three-digit ms.

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Tian Kevin <kevin.tian@intel.com>
xen/common/schedule.c

index f1121938da94311d8af56d9ed87b907a13120e3a..23807ea330ac083fb3eaceb6e47d764b8d17d7aa 100644 (file)
@@ -818,8 +818,9 @@ static void schedule(void)
     next = next_slice.task;
 
     sd->curr = next;
-    
-    set_timer(&sd->s_timer, now + r_time);
+
+    if ( !is_idle_vcpu(next) )
+        set_timer(&sd->s_timer, now + r_time);
 
     if ( unlikely(prev == next) )
     {